package com.ruoyi.system.domain;

import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 系统授权对象 sys_authorization
 * 
 * @author ruoyi
 * @date 2025-10-15
 */
public class SysAuthorization extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 授权ID */
    private Long authId;

    /** 授权码（加密存储） */
    @Excel(name = "授权码")
    private String authCode;

    /** 授权名称 */
    @Excel(name = "授权名称")
    private String authName;

    /** 机器码 */
    @Excel(name = "机器码")
    private String machineCode;

    /** 授权开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "授权开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 授权过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "授权过期时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date expireTime;

    /** 最大用户数 */
    @Excel(name = "最大用户数")
    private Integer maxUsers;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 是否永久授权（0否 1是） */
    @Excel(name = "是否永久授权", readConverterExp = "0=否,1=是")
    private String isPermanent;

    /** 授权人 */
    @Excel(name = "授权人")
    private String authorizedBy;

    /** 授权说明 */
    @Excel(name = "授权说明")
    private String authDesc;

    public void setAuthId(Long authId) 
    {
        this.authId = authId;
    }

    public Long getAuthId() 
    {
        return authId;
    }

    public void setAuthCode(String authCode) 
    {
        this.authCode = authCode;
    }

    public String getAuthCode() 
    {
        return authCode;
    }

    public void setAuthName(String authName) 
    {
        this.authName = authName;
    }

    public String getAuthName() 
    {
        return authName;
    }

    public void setMachineCode(String machineCode) 
    {
        this.machineCode = machineCode;
    }

    public String getMachineCode() 
    {
        return machineCode;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setExpireTime(Date expireTime) 
    {
        this.expireTime = expireTime;
    }

    public Date getExpireTime() 
    {
        return expireTime;
    }

    public void setMaxUsers(Integer maxUsers) 
    {
        this.maxUsers = maxUsers;
    }

    public Integer getMaxUsers() 
    {
        return maxUsers;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setIsPermanent(String isPermanent) 
    {
        this.isPermanent = isPermanent;
    }

    public String getIsPermanent() 
    {
        return isPermanent;
    }

    public void setAuthorizedBy(String authorizedBy) 
    {
        this.authorizedBy = authorizedBy;
    }

    public String getAuthorizedBy() 
    {
        return authorizedBy;
    }

    public void setAuthDesc(String authDesc) 
    {
        this.authDesc = authDesc;
    }

    public String getAuthDesc() 
    {
        return authDesc;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("authId", getAuthId())
            .append("authCode", getAuthCode())
            .append("authName", getAuthName())
            .append("machineCode", getMachineCode())
            .append("startTime", getStartTime())
            .append("expireTime", getExpireTime())
            .append("maxUsers", getMaxUsers())
            .append("status", getStatus())
            .append("isPermanent", getIsPermanent())
            .append("authorizedBy", getAuthorizedBy())
            .append("authDesc", getAuthDesc())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
